home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD-ROM Today - The Disc! 5
/
CD-ROM Today - The Disc (Issue 5)(November 1994).ISO
/
mac
/
Mac shareware
/
Education
/
RLaB
/
help
/
COMPLEX
< prev
next >
Wrap
Text File
|
1994-09-21
|
888b
|
43 lines
COMPLEX:
RLaB supports COMPLEX data types. The "type" of a variable is
revealed by typing:
var.type
or
show(var)
In the 1st instance the return value is a string, in the 2nd
instance, the return value is a string matrix.
Complex variables can be used via the MATLAB syntax:
i = sqrt(-1)
z = 1 + 2*i
z = a + b*i
or with RLaB's complex constant feature:
z = 1 + 2i
z = 1 + 2j // equivalent to the previous statement
The complex constants `i' and `j' do not interfere with
ordinary variables `i' and `j' since the complex constants
must immediately follow a number to be interpreted as a
complex constant.
For example:
1i // valid complex constant
1 i // two separate statements
Wherever it makes sense, built-in functions will accept real,
and complex arguments. For example, inv(), det(), eig(), fft()
will accept both real and complex inputs.